perm filename APPLY.DOC[SYS,HE] blob sn#032854 filedate 1973-03-30 generic text, type T, neo UTF8
APPLY MANUAL


      APPLY is a program to apply the new Heuckel operator  to images
selected by the user.  It is designed for debugging the operators, as
well as  observing how they  work on various  types of input.   It is
also useful for observing the  effect on the image of  changing clips
and DAC settings. A 20x20 point window is obtained, either from  a TV
camera or a  disk file and  the user can  apply the operators  at any
desired points  in the window,  varying many parameters  to determine
their  effect  on  the  operator  output,  which  is  presented  both
numerically and graphicly.

      The program is found on APPLY.DMP[SYS,HE].   This documentation
file is found on APPLY.DOC[SYS,HE].  Bugs and suggestions to KKP.
APPLY MANUAL                                                        1


                             THE DISPLAY

      When the  program is  running the display  is divided  into six
sections, seperated by lines, as follows:

                        *                       *
   MODES SECTION        *                       *
                        *                       *
*************************                       *
                        *                       *
                        *       WINDOW LIMITS/  *       COMMANDS
                        *         POINTER LOC   *       SECTION
                        *         SECTION       *
                        *                       *
                        *                       *
                        *                       *
                        *                       *
   WINDOW SECTION       *       TV PARAMETER    *
                        *          SECTION      *
                        *                       *
                        *                       *
                        *                       *
*******************************************************************



                OPERATOR OUTPUT SECTION



*******************************************************************


                PAGE PRINTER SECTION



      The modes section  contains the TV  camera number, if  using TV
images, or the disk file last read in. It also contains the number of
bits/sample for the current image,  as read in if using a  disk file;
otherwise 4 for  regular TV images and  6 for Quam sixbit  input.  If
Quam sixbit input  is being used, the  number of images  averaged and
the number of  ranges follows the number  of bits as  AVE/RANGE.  The
picture resolution  is indicated as  NORMAL  or DOUBLE.   Finally, if
any of DDT  (RAID), DDVID, or the  edge follower are  available, that
will  also be  indicated.  This section  is always  displayed  and is
updated as necessary.
APPLY MANUAL                                                        2


      The window section contains  the intensities at each  sample in
the selected 20x20 window.  One of the intensities will  be displayed
much brighter than the others.   This is the position of  the pointer
which indicates  where the operator  will be applied  when requested.
If the operator display is present, there will be a  circle displayed
in this section, with its center at the pointer  coordinates, showing
the area of the window the operator covered.  If edges or  lines were
found, a bright line shows  the location of the composite  edge, with
(possibly)  one or  two dimmer  lines showing  the boundaries  of the
three areas the operator divides the scene into. The window is always
displayed and is updated whenever the image is changed.   The pointer
display changes as the  user moves it.  The operator  graphic display
is shown only when the operator is applied (see the commands for when
the operator will be displayed.

      The  upper portion  of  the window  limits/pointer  loc section
shows  the  current coordinates  of  the limits  of  the  window, the
position of the pointer in  the window in octal and decimal,  and the
number  of the  operator last  used.  It  is always  displayed.  When
using TV  images, the bottom  portion of this  section will  show the
current values  of TCLIP and  BCLIP, the current  setting of  the DAC
controlling the sensitivity for the  COHU camera (if it has  been set
by the user) and the A-D converter reading when the DAC was last set.
This display is turned off when using disk images.

      The commands section displays the list of commands in  a format
similar to  that below, except  with abbreviated  descriptions.  Only
the  commands  which are  currently  legal are  displayed.   Thus the
execution  of many  of the  commands will  change this  section.  The
entire section can be turned off and on by the user to reduce flicker
and make the screen less cluttered.

      The operator output section is displayed only when the operator
is applied  and it shows  the entire output  of the operator.   For a
description of the variables displayed see the operator documentation
in the hand/eye library write up.

      The bottom of the display is reserved for the page printer.



                    TTY INPUT AND INITIALIZATION

      The program is APPLY.DMP[SYS,HE].  When run it will ask  if you
want to use  a TV camera (reply  Y<CR> or N<CR>).  Depending  on your
answer it  will then ask  for either the  camera number (1-4)  or the
disk  file  name.  Terminate  either  by  <CR>.   It  must  have this
APPLY MANUAL                                                        3


information mainly so it  can initialize properly.  If you  are using
disk files, you might not have the cameras turned on.   After setting
up the  initial display, the  program will type  READY and  will then
accept commands.

      Commands  are  one  character  codes,  possibly  preceded  by a
numeric  argument  Numbers  can  be  integer  or  real;  the  command
following it will make  the necessary type conversions, if  any.  The
command is  executed as soon  as it is  typed; no <CR>  is necessary.
The R, S, and  W commands request additional information  before they
can execute properly.  This  addition input is terminated by  a <CR>.
Otherwise <CR> and  space are accepted as no-ops.



                                DDVID

      This program can display  pictures using DDVID and,  when using
disk images, overlay outlines on one of DDVID's channels  (whether or
not DDVID is available).  Therefore, before using disk images  or the
V command, be sure nobody else is using DDVID or you will  ruin their
display.  In general, if the  mode section of the display  says DDVID
is available  and you  did not  start it, be  sure it  is not  in use
before  proceding  to  use  it.  DDVID  users  are  easily  driven to
violence.



                              COMMANDS

      The command codes listed  below have three formats.  If  a code
is preceded  by 'n',  it will not  be recognized  unless a  number is
entered before it as  an argument.  If the  n is enclosed in  <>, the
argument  is optional;  the description  will contain  the construct:
D=m, where m is the default argument if none was given.  If  the code
is not preceded  by anything, it does  not need an argument  and will
ignore any  given to  it.  Arguments  are unsigned  numbers, possibly
containing a decimal point.  All commands except Y and Z will use the
integer part of the argument.  If a parameter is initialized  to some
value m at the start  of the program, the description of  the command
which changes it will  contain the construct: I=m.  If  a description
contains  the  construct:  a≤n≤b,  this is  the  valid  range  of the
argument and  it will  be set to  the nearest  limit if  outside this
range.

      The following  flags are used  to indicate restrictions  on the
commands and their effect on the display:
APPLY MANUAL                                                        4


     A        the operator display will be turned off if it was on

     B        the mode section will be updated

     C        the  operator will  be called  and displayed  after the
              command is finished

     D        the  TV  camera  will  be  read  after  the  command is
              finished and the window will be updated

     E        this command is recognized only when using TV images.

     F        this command is recognized only in TV mode using  4 bit
              images

     G        this command is recognized  only if APPLY is  loaded as
              part of the edge follower

      If a command is not  recognized, a question mark will  be typed
and the command will be ignored. A few commands have  error messages,
which should be self-explanitory.

CODE  FLAGS   DESCRIPTION
____  _____   ___________

M     AD      Move the window.  Pot 12 controls horizontal motion and
              pot 13 controls vertical motion.  If you are in TV mode
              the cursor on the  TV monitor will show the  area being
              read; otherwise, a rectangle representing the limits of
              the disk image is  displayed on channel 36 (one  of the
              DDVID channels) and a rectangle the size of  the window
              is moved inside it  to show the position of  the window
              in the image.  In the later case, if the disk image has
              been  displayed  by   DDVID  (V  command)   the  window
              rectangle will overlay it  to show the area  which will
              be used for the  window.  The window cannot  go outside
              the  limits of  the image.   Typing any  character will
              cause  the program  to return  to the  command scanner.
              The character typed is given to the command  decoder as
              part  of  the  next  command.   The  pointer   will  be
              positioned in the center of the window.

<n>↑  A       the  position  of  the  pointer  will  be  moved  up  n
              positions in the window, or to the edge of  the window,
              whichever is reached first.  0≤n≤20. D=1.

<n>↓  A       same as ↑ except pointer is moved down.

<n>→  A       same as ↑ except pointer is moved to the right.
APPLY MANUAL                                                        5


<n>←  A       same as ↑ except pointer is moved to the left.

<n>O  C       apply    Operator  n.   1≤n≤2.  I=1.   D=last  operator
              specified.

<n>C  ABD     enter TV mode using  Camera n.  If you were  already in
              TV  mode, this  forces rereading  the camera  using the
              current  settings of  all variables,  possibly changing
              the camera to be read if a new number is specified.  If
              you were previously processing a disk image you will be
              initialized with  the window  in the  center of  the TV
              image, the  pointer in the  center of the  window, four
              bit  images,   and  normal  resolution.    1≤n≤4.  I=as
              specified when program was started if started in camera
              mode else 1. D=last camera number specified.

R     AB      Read a disk file and enter disk mode.  A file name will
              be requested, which must  be terminated by a  <CR>.  If
              the file cannot be found, or an error occurs,  an error
              message is typed and a new file name requested.  If the
              file has a title it will be typed out.  If  it contains
              images under  more than  one filter  you will  be asked
              which filter you want.  Give at least the  first letter
              of the filter followed by a <CR>.  If the disk image is
              larger than 20x20, the  window will be centered  in the
              image and the rectangles described under the  M command
              will  be  displayed.   Images  less  than   20x20  will
              probably  blow  the  program.   The  pointer   will  be
              centered in the window.

nY    C       n  becomes  the  new  value  of  CONF,  the  confidence
              threshold  for the  operators.   It is  a  real number.
              0≤n≤1.0  but  the   useful  range  is   something  like
              0.8≤n≤0.98.  I=0.90.

nZ    C       n  becomes  the  new  value  of  DIFF,  the  brightness
              difference threshold for  the operators.  It is  a real
              number also.  0≤n≤999.  I=1.5.

nB    ADF     n  becomes  the new  value  of BCLIP.  I=7.  0≤n≤7.  It
              should be ≥ TCLIP but the program does no checking.

nT    ADF     n  becomes  the new  value  of TCLIP.  I=0.  0≤n≤7.  It
              should be ≤ BCLIP but the program does no checking.

S     ABDE    switches to Sixbit mode.  Thereafter, all TV input will
              be  six  bit  samples,  using  the  Quam  sixbit  input
APPLY MANUAL                                                        6


              routines.   BCLIP and  TCLIP will  be set  to 7  and 0,
              respectively  and  normal  resolution  is  forced.  The
              program will request the number of clip level ranges to
              be  used (1-7  with  the higher  numbers  giving better
              results) and  the number of  frames to be  averaged for
              each range. The answers must be terminated by <CR>.  TV
              input is much slower in this mode.

F     ABDE    switches  to Four  bit mode.   Thereafer, all  TV input
              will be four bit samples, using raw TV input.   This is
              the  fastest  way  to obtain  images,  and  the program
              starts in this mode.

W     E       Write the current window on the disk.  A file name will
              be requested and must be terminated by a <CR>.  It will
              request a new name if there are any errors.  The window
              is written  as the image  under the clear  filter, with
              the title APPLY OUTPUT.  A description will be provided
              of the form:
                        CAMERA: n
                        TVCAM:  n
                        RESOLUTION: {NORMAL or DOUBLE}
                        TCLIP:  n
                        BCLIP:  n
                        DAC:    n
              where the appropriate number  is filled in for  n.  The
              contents  of  the  window and  the  parameters  are not
              altered.  Outputting windows when the input was  a disk
              file is not  provided because it  is messy to  pull the
              window out of the  input file and you can  recreate the
              current state exactly from the input file anyway.

H     E       sHow the  location in the  image of the  current window
              with the cursor on  the monitor until any  character is
              typed. The character is given to the command decoder.

N     ABDF    Normal resolution mode.   This is the mode  the program
              starts in.

I     ABDF    Increate  resolution  (enter  double  resolution mode).
              Thereafter,  whenever   the  TV   is  read,   a  double
              resolution  image  is  read in.   This  is  slower than
              normal  resolution  since the  program  must  read four
              images  and  merge  them.   Since  the  hand/eye system
              cannot   cope   with   fractional    coordinates,   the
              coordinates of the  pointer and window limits  will not
              change but  the area being  read in corresponds  to the
APPLY MANUAL                                                        7


              10x10 area  in the center  of the normal  20x20 window.
              Therefore, the exact  window limits are five  points in
              from what the display says and the  pointer coordinates
              are     Xreal=((X-LEFT)/2)+LEFT+5     and    Yreal=((Y-
              TOP)/2)+TOP+5. When executing the M and H commands, the
              areas being  read are the  correct 10x10 square  so you
              can position accurately.

<n>D  ADE     (recognized only if using TV 1).  Set the DAC to  n and
              display both  the new DAC  setting and the  AD reading.
              I=0. 0≤n≤63.  If n  is not given, the current  value is
              incremented by one.

?             Reverse the state of the command display (on or off).

V             send the current window  to DDVID for displaying  if in
              TV mode;  send the entire  disk buffer  otherwise.  The
              size will  be doubled  if the display  will fit  on the
              screen.  This  command is recognized  only if  DDVID is
              available.

X             go to DDT/RAID  (not recognized if DDT  not available).
              APPLY   display   will  be   turned   off.    In  RAID,
              FRMDDT<cntl>G will  return you  to the  command decoder
              with APPLY's display on and RAID's off.  If you  are in
              RAID and need the display turned off, TODDT<cntl>G will
              do it and return to RAID, with RAID's  current location
              pointer  changed.  If  you are  in APPLY  and  have the
              wrong display, most  commands will fix the  problem. ??
              is a good no-op for fixing displays.

T     G       call the edge follower to track an edge at  the pointer
              location.

A     G       accomodate at the pointer location.

E     G       exit to the edge follower command decoder.